import React, { Component } from 'react'
import { withRouter } from 'react-router'
import { LeftOutlined, CreditCardOutlined } from '@ant-design/icons'
import { connect } from 'react-redux'
import action from '../../../store/action'

class Cardroll extends Component {
    render() {
        let {youhui} = this.props
        console.log(youhui);
        return (
            <div className="card">
                <div className="back">
                    我的卡卷
                    <span onClick={() => { this.props.history.push('/mine') }}><LeftOutlined /></span>
                </div>
                <div className="list">
                    {
                        youhui.map((item,index)=>{
                            return <div className="card_every" key={index}>
                            <span> </span>
                            <p className="card_juan">{item.youName}</p>
                            <p className="card_price">
                                <CreditCardOutlined style={{ fontSize: '22px' }} />
                                <span>￥{item.price}</span>
                            </p>
                        </div>
                        })
                    }
                </div>
            </div>
        )
    }
    componentDidMount(){
        let {youhui} = this.props
        console.log(youhui);
    }
}
export default connect(state=>state.home,action.home)(withRouter(Cardroll))